<template>
		<view class="main">
			<view style="text-align: center;" v-if="nodes.length<=0">您未收藏图集</view>
			<Node @close="del(index)" v-for="(item,index) in nodes" :node="item" iscollent="true"></Node>
		</view>
</template>

<script>
	import Node from "../../compoent/node/node.vue"
	export default {
		components:{Node},
		data() {
			return {
				nodes:[]
			}
		},
		onShareAppMessage(res) {
			return {
			   title: "waterghost-万能头像库",
			   path: "/pages/details/details?id="+res.target.dataset.id
			}
		},
		onReady() {
			var that = this
			var token = uni.getStorage({
				key:"token",
				success(v) {
					uni.request({
						url:"https://app.waghost.com/api/collent/usercollents",
						header:{
							"Authorization":"TOKEN "+v.data
						},
						success(va) {
							that.nodes=va.data.data
						}
					})
				}
			})
		
			
		},
		methods: {
			del(index){
				this.nodes.splice(inedx,1)
			}
		}
	}
</script>

<style scoped>
	.main{
		padding: 15rpx;
		box-sizing: border-box;
	}
</style>
